home *** CD-ROM | disk | FTP | other *** search
/ Champak 146 / (Vol 146) Jan 07 2012.iso / Games / star_catcher.swf / scripts / DefineSprite_122 / frame_5 / DoAction.as
Encoding:
Text File  |  2012-01-07  |  1.2 KB  |  22 lines

  1. if(Number(this._y) - Number(_root.UP_SPEED) > _root.VERT_CEIL)
  2. {
  3.    setProperty(this, _Y, Number(this._y) - Number(_root.UP_SPEED));
  4.    setProperty("_root.catchPointTop", _Y, Number(_root.catchPointTop._y) - Number(_root.UP_SPEED));
  5.    setProperty("_root.catchPointBottom", _Y, Number(_root.catchPointBottom._y) - Number(_root.UP_SPEED));
  6.    setProperty("_root.interface.burst" + _root.gCurrentChannel, _Y, Number(eval("_root.interface.burst" + _root.gCurrentChannel + "._y")) - Number(_root.UP_SPEED));
  7.    play();
  8. }
  9. else
  10. {
  11.    var vLeftover;
  12.    vLeftover = Number(this._y) - Number(_root.VERT_CEIL);
  13.    setProperty(this, _Y, _root.VERT_CEIL);
  14.    setProperty("_root.catchPointTop", _Y, Number(Number(_root.catchPointTop._y) - Number(vLeftover)) + Number(_root.HIT_ADJUST));
  15.    setProperty("_root.catchPointBottom", _Y, Number(Number(_root.catchPointBottom._y) - Number(vLeftover)) + Number(_root.HIT_ADJUST));
  16.    setProperty("_root.interface.burst" + _root.gCurrentChannel, _Y, Number(eval("_root.interface.burst" + _root.gCurrentChannel + "._y")) - Number(vLeftover));
  17.    delete vLeftover;
  18.    _root.gOlieState = "stall_left";
  19.    vCounter = Number(0);
  20.    gotoAndPlay(15);
  21. }
  22.